package com.mdd.front.validate;

import com.mdd.common.validator.annotation.IDMust;
import com.mdd.common.validator.annotation.IntegerContains;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * 充值订单参数
 * @author panweiliang
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class RechargeOrderParam extends BaseParam {

    @IDMust(message = "id参数必传且需大于0", groups = {update.class, delete.class})
    private Integer id;

    @DecimalMin(value = "0", message = "userId参数值不能少于0", groups = {create.class, update.class})
    private Integer userId;

    @NotNull(message = "terminal参数缺失", groups = {create.class, update.class})
    @IntegerContains(values = {1, 2, 3, 4, 5, 6}, message = "orderTerminal参数值不在符合范围", groups = {create.class, update.class})
    private Integer terminal;

//    @NotNull(message = "payWay参数缺失", groups = {create.class, update.class})
//    @IntegerContains(values = {1, 2, 3}, message = "payWay参数值不在符合范围", groups = {create.class, update.class})
//    private Integer payWay;

    @NotNull(message = "orderAmount参数缺失", groups = {create.class, update.class})
    private BigDecimal orderAmount;

    private String award;

}
